Add Composite Check Functionality to SBOL Utilities#238
Open
vinayakjeet wants to merge 6 commits intoSynBioDex:developfrom
Open
Add Composite Check Functionality to SBOL Utilities#238vinayakjeet wants to merge 6 commits intoSynBioDex:developfrom
vinayakjeet wants to merge 6 commits intoSynBioDex:developfrom
Conversation
Contributor
|
Tests are failing, but currently only the two caused by #231, so the testing is sufficient to proceed to a full review. |
jakebeal
requested changes
Apr 7, 2024
Contributor
jakebeal
left a comment
There was a problem hiding this comment.
A few minor adjustments are needed.
More importantly, a test needs to be added that will validate that this function behaves as expected.
Hi @jakebeal, I have implemented all requested changes: - **Removed** the unnecessary `hasattr(o, "generated_by")` check. - **Replaced** `'sbol:design'` with `sbol3.SBOL_DESIGN`. - **Added** a docstring to `is_composite()` for better documentation. Please review and let me know if any further modifications are needed. Thanks! 🚀
Update helper_functions.py
Hi @jakebeal, I have implemented all requested changes: - **Removed** the unnecessary `hasattr(o, "generated_by")` check. - **Replaced** `'sbol:design'` with `sbol3.SBOL_DESIGN`. - **Added** a docstring to `is_composite()` for better documentation. Please review and let me know if any further modifications are needed. Thanks! 🚀
Author
|
Hi @jakebeal, Implemented all requested changes:
Please review and let me know if any further modifications are needed. Thanks! 🚀 |
SynBioDex#69 test cases
Author
|
Added test cases for composite component checks. Please review and run. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#69
Overview
This PR introduces a new helper function,
is_composite, to the SBOL Utilities package, addressing the need for an efficient way to determine if an SBOL Component is a composite. This functionality was proposed to tackle issue #69, focusing on components that are of DNA type and linked to an assembly plan via thegenerated_byattribute.Changes
is_compositeFunction: Determines whether an SBOL Component is a composite by checking for DNA type and assembly plan linkage.has_dna_typeandhas_assembly_planas helper functions to modularize the checks required for theis_compositefunction.Justification
The need for a composite check function was identified as a part of enhancing the SBOL utilities package to support more nuanced checks for components within SBOL documents. The ability to identify composite components efficiently is crucial for developers working with synthetic biology data, facilitating more sophisticated data analysis and manipulation tasks.
Implementation Details
has_dna_typefunction utilizes thetytolibrary to map component types to known DNA terms, ensuring that the component is of DNA type.has_assembly_planfunction searches for thegenerated_byattribute in the component and verifies that any linked activities are marked with bothhttp://sbols.org/v3#assemblyPlanandsbol:designtypes, adhering to SEP 054 specifications.is_compositefunction integrates these checks, offering a straightforward way to determine if a component meets the criteria for being considered a composite.Future Work
While this PR addresses the immediate need for composite component identification, future enhancements could include:
Acknowledgements
Special thanks to contributors and reviewers who have offered insights and feedback throughout the development of this feature, especially those involved in the discussion of issue #69.
closes #69